Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dal,sdf): Auto-enqueue update functions for impacted components #5511

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

britmyerss
Copy link
Contributor

For now, this is behind a feature flag as we work out the various permutations and behavior we want to see.

When an attribute value is updated for a component, and the component has a resource AND an update function exists, enqueue it. Then, build a dependency graph, and if any downstream components with resources also have update functions, enqueue them as well.

Copy link

github-actions bot commented Feb 19, 2025

Dependency Review

✅ No vulnerabilities or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

@github-actions github-actions bot added A-sdf Area: Primary backend API service [Rust] A-dal A-si-posthog-rs labels Feb 19, 2025
@britmyerss britmyerss requested a review from jhelwig February 19, 2025 21:02
// potentially needing an update action
// NOTE: We have no way to guarantee that a component's value will actually be different after DVU
// so for now, just enqueue if the value is enqueued to change. More work here is likely needed
let dependency_graph = DependentValueGraph::new(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can likely be refined to look for updates only to domain, or something to that effect, but as it's behind a flag, we can iterate here to work out the permutations

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually I'm changing this up now. stay tuned.

@@ -231,11 +231,8 @@ async fn auto_queue_creation(ctx: &mut DalContext) {
assert!(action_ids.is_empty());
}

// TODO This test is a stub that should be fixed after actions v2 is done
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODONE

For now, this is behind a feature flag as we work out the various permutations and behavior we want to see.  

When an attribute value is updated for a component, and the component has a resource AND an update function exists, enqueue it. Then, build a dependency graph, and if any downstream components with resources also have update functions, enqueue them as well.
@britmyerss britmyerss marked this pull request as draft February 19, 2025 22:24
@britmyerss britmyerss force-pushed the brit/auto-enqueue-update-actions branch from 88b3885 to ce1ecdb Compare February 19, 2025 23:15
@britmyerss britmyerss marked this pull request as ready for review February 20, 2025 00:10
@nickgerace nickgerace added this pull request to the merge queue Feb 20, 2025
Merged via the queue into main with commit aa21325 Feb 20, 2025
9 checks passed
@nickgerace nickgerace deleted the brit/auto-enqueue-update-actions branch February 20, 2025 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dal A-sdf Area: Primary backend API service [Rust] A-si-posthog-rs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants